import React,{useState} from 'react'
import HeighSearch from '../HeighSearch'
import TableData from './TableData'
import './content.css'

export default function Index() {
  const [classIndex,setClassIndex] = useState(0)
  function changeClass(e){
    setClassIndex(e.currentTarget.getAttribute("data-index"));
  }

  // 接收一级标题
  


  return (
    <div id='Cuscontent'>
      <HeighSearch />
      <div id='Cuscontent_table'>
        <ul>
          {/* eslint-disable-next-line */}
          <li className={"0"===classIndex?"active":""} onClick={changeClass} data-index="0">已成交(0)</li>
          <li className={"1"===classIndex?"active":""} onClick={changeClass} data-index="1">等待打款(0)</li>
          <li className={"2"===classIndex?"active":""} onClick={changeClass} data-index="2">确定细节(0)</li>
          <li className={"3"===classIndex?"active":""} onClick={changeClass} data-index="3">有意向(0)</li>
          <li className={"4"===classIndex?"active":""} onClick={changeClass} data-index="4">潜在客户(0)</li>
        </ul>
      </div>
      <div>
        <TableData />
      </div>
    </div>
  )
}
